home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKitArchive.mbox / mbox / 000275_misckit-reques…aska.et.byu.edu_Tue Oct 11 18:30:02 1994.msg < prev    next >
Internet Message Format  |  1994-10-30  |  3KB

  1. Return-Path: <misckit-request@alaska.et.byu.edu>
  2. Received: from alaska.et.byu.edu by darth.byu.edu (NX5.67e/NX3.0M)
  3.     id AA00323; Tue, 11 Oct 94 18:29:43 -0600
  4. Received: from yvax1.byu.edu by alaska.et.byu.edu; Tue, 11 Oct 1994 16:22:06 -0600
  5. Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-10 #7277)
  6.  id <01HI5N5AX43K93JZNS@yvax.byu.edu>; Tue, 11 Oct 1994 16:21:47 -0600 (MDT)
  7. Received: from alaska.et.byu.edu by yvax.byu.edu (PMDF V4.3-10 #7277)
  8.  id <01HI5N54924G93K1HP@yvax.byu.edu>; Tue, 11 Oct 1994 16:21:38 -0600 (MDT)
  9. Received: from acs1.byu.edu by alaska.et.byu.edu; Tue,
  10.  11 Oct 1994 16:15:43 -0600
  11. Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-10 #7277)
  12.  id <01HI5MX9FOCW9N69TS@yvax.byu.edu>; Tue, 11 Oct 1994 16:15:30 -0600 (MDT)
  13. Received: from skycat.usask.ca by yvax.byu.edu (PMDF V4.3-10 #7277)
  14.  id <01HI5MWSKSF493JRTF@yvax.byu.edu>; Tue, 11 Oct 1994 16:14:57 -0600 (MDT)
  15. Received: from skatter.USask.Ca.usask.ca (skatter.usask.ca)
  16.  by SKYCAT.USask.CA (PMDF V4.3-11 #5952)
  17.  id <01HI5MWAM7R48Y65EL@SKYCAT.USask.CA>; Tue, 11 Oct 1994 16:14:31 -0600 (CST)
  18. Received: from pisces (pisces.usask.ca) by skatter.USask.Ca.usask.ca
  19.  (4.1/SMI-4.1) id AA16107; Tue, 11 Oct 94 16:14:21 CST
  20. Received: by pisces (NX5.67e/NX3.0X) id AA06657; Tue, 11 Oct 94 16:14:16 -0600
  21. Received: by NeXT.Mailer (1.100)
  22. Received: by NeXT Mailer (1.100)
  23. Date: Tue, 11 Oct 1994 16:14:16 -0600
  24. From: eric@skatter.usask.ca (Eric Norum)
  25. Subject: Sending MiscStrings bycopy still leaks memory.
  26. To: misckit@byu.edu
  27. Cc: eric@sask.usask.ca
  28. Message-Id: <9410112214.AA16107@skatter.USask.Ca.usask.ca>
  29. Content-Transfer-Encoding: 7BIT
  30.  
  31. Here's part of the protocol from my IEEE488 device server:
  32. @protocol LeCroyScope
  33.     .
  34.     .
  35. - (bycopy id)getWaveformForTrace:(bycopy in MiscString *)trace;
  36. @end
  37.  
  38. Here's how the method is implemented:
  39. - getWaveformForTrace:(MiscString *)trace
  40. {
  41.         id waveform;
  42.  
  43.         waveform = [[LeCroy9300Waveform alloc] init];
  44.         if (([self outputCommand:"%s:WF?", [trace stringValue]] == NO)
  45.          || (_ieeewt (enterString, enterLength) < 0)
  46.          || ([waveform getWaveform] == NO)) {
  47.                 [waveform free];
  48.                 waveform = nil;
  49.         }
  50.         [trace free];
  51.         return waveform;
  52. }
  53.  
  54. And here's what MallocDebug shows as a leak every time a client sends a  
  55. getWaveFormForTrace: message to the server:
  56.  default  0x0625dc54     17    
  57.  
  58.         -[MiscString allocateBuffer:fromZone:],
  59.         -[MiscString allocateBuffer:],
  60.         -[MiscString(NEXTSTEP) decodeUsing:],
  61.         -[NXPortPortal decodeObject],
  62.         idecodeData,
  63.         -[NXPortPortal decodeData:ofType:],
  64.         -[NXMethodSignature decodeMethodParamsFrom:],
  65.         +[NXConnection handleRequestOnPortal:]
  66.  
  67. HELP!
  68. This works out to over 7 Megabytes a day!!!!!!!
  69.  
  70.  
  71. Eric Norum                             eric@skatter.usask.ca
  72. Saskatchewan Accelerator Laboratory
  73. University of Saskatchewan
  74. Saskatoon, Canada.                     NeXTMail accepted.